#!/bin/sh

volume="$(pactl get-sink-volume @DEFAULT_SINK@ | grep -Eo '[0-9]+%' | head -n 1)"
volumenum="${volume%\%}"
icon="audio-volume-medium"
if [ "$volumenum" -gt 66 ]; then
	icon="audio-volume-high"
elif [ "$volumenum" -le 33 ]; then
	icon="audio-volume-low"
	if [ "$volumenum" -eq 0 ]; then
		icon="audio-off"
	fi
fi
dunstify -i "$icon" -a "$1" -h string:x-dunst-stack-tag:PULSE_VOLUME "Pulseaudio" -h int:value:"$volume" "$volume"
pw-play /usr/share/sounds/ITGC/notify.flac
